‹#›
Autodesk Inventor 定制开发在线培训 2010
•接口定义
•
•
•
•
•使用接口
•Automation
Imports System.Runtime.InteropServices
Namespace MyAddIn
<GuidAttribute("dc87720d-8e8d-4575-b6e4-64cfa5ca13f8")> _
Public Interface MyInterface
Function MyFunction(ByVal someString As String) As String
End Interface
End Namespace
Sub CallMyInterface()
Dim invAddIn As ApplicationAddIn
Set invAddIn =
_InvApplication.ApplicationAddIns.ItemById("{dc87720d-8e8d-4575-b6e4-64cfa5ca13f7}")
MsgBox invAddIn.Automation.myFunction("some string")
End Sub